{extend name="public/base"}

{block name="title"}
交易明细
{/block}

{block name="style"}
{css href="/static/wechat/css/wallet.css" /}
<style>
    .weui-form-preview__label {
        text-align: left;
    }
</style>
{/block}

{block name="body"}
<div class="pageControl tradeDetails">
    <div class="msui_nav msui_navTop">
        <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">交易详情</h1>
    </div>
    <div class="weui-form-preview">
        <div class="weui-form-preview__hd">
            <label class="weui-form-preview__label fs09 cl-8c8c">金额（元）</label>
            {in name="data.source" value='1, 2, 3, 4, 5, 7, 8, 10, 12, 13'}
            <em class="weui-form-preview__value fs085 cl-orange" style="color: green;">+{$data.money}</em>
            {else/}
            <em class="weui-form-preview__value fs085 cl-orange" style="color: red;">-{$data.money}</em>
            {/in}
        </div>
        <div class="weui-form-preview__bd">
            {gt name="data.order_price" value="0"}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">成交金额</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.order_price}</span>
            </div>
            {/gt}
            {gt name="data.poundage" value="0"}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">平台服务费</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.poundage}</span>
            </div>
            {/gt}
            {if condition="($data.coupon_money > 0) && ($data.order_price > $data.money + $data.poundage)"} {
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">优惠券抵扣</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.coupon_money}</span>
            </div>
            {/if}
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">交易名称</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.msg}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">当前状态</label>
                {if condition="($data.source == 6)"}
                    {eq name="data.status" value="0"}
                    <span class="weui-form-preview__value fs085 cl-3333 cl-yellow">审核中</span>
                    {/eq}
                    {eq name="data.status" value="1"}
                    <span class="weui-form-preview__value fs085 cl-3333 cl-green">审核通过</span>
                    {/eq}
                    {eq name="data.status" value="2"}
                    <span class="weui-form-preview__value fs085 cl-3333 cl-orange">审核失败</span>
                    {notempty name="data.withdraw_msg"}
                    <span class="weui-form-preview__value fs05 cl-3333 cl-orange">原因：{$data.withdraw_msg}</span>
                    {/notempty}
                    {/eq}
                {else /}
                    {eq name="data.frozen_status" value="1"}
                        {eq name="data.source" value="9"}
                            <span class="weui-form-preview__value fs085 cl-3333">已支付</span>
                        {else /}
                            <span class="weui-form-preview__value fs085 cl-3333 cl-yellow">冻结</span>
                        {/eq}
                    {else /}
                    <span class="weui-form-preview__value fs085 cl-3333">交易完成</span>
                    {/eq}
                {/if}
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">创建时间</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.add_time|date='Y-m-d H:i', ###}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">交易方式</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.pay_type|default=""}</span>
            </div>
            <div class="weui-form-preview__item">
                <label class="weui-form-preview__label fs085 cl-9999">订单号</label>
                <span class="weui-form-preview__value fs085 cl-3333">{$data.order_sn|default=""}</span>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="javascript"}
{/block}
